/**
 * 
 */
package com.explgo.backend.rest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.explgo.backend.domain.User;
import com.explgo.backend.service.UserService;

/**
 * The user rest service.
 * 
 * @author Jialiang(Cain) Wang
 * 
 */
@Controller
@RequestMapping("/user")
public class UserController extends AbstractController {
	@Autowired
	private UserService userService;

	/**
	 * Gets the current user.
	 * */
	@RequestMapping("/current")
	@ResponseBody
	public User getCurrentUser() {
		return userService.getCurrentUser();
	}
}
